#!/usr/bin/env bash

which git || exit 1

#Parity
if [[ "Linux" == `uname -s` ]]; then
    which cargo ||
        curl https://sh.rustup.rs -sSf | sed 's@static.rust-lang.org@mirrors.usct.edu.cn/rust-static@' ||
        exit 1

    cd /tmp || exit 1
    git clone --depth=1 https://github.com/paritytech/parity-ethereum.git || exit 1
    cd parity-ethereum || exit 1
    cargo build --release || exit 1
    cp target/release/parity /tmp/meth/ || exit 1
fi

